package com.study.mq.kafka.interceptor;

import org.apache.kafka.clients.consumer.ConsumerInterceptor;
import org.apache.kafka.clients.consumer.ConsumerRecords;

import java.util.Map;

/**
 * @author ysy
 * @version 1.0
 * @Title: MyConsumerInterceptor
 * @Note 自定义消费端拦截器
 * <br><b>PackageName:</b> com.study.mq.kafka.interceptor
 * <br><b>ClassName:</b> '
 * <br><b>Date:</b>
 */
public class MyConsumerInterceptor implements ConsumerInterceptor {

    /**
     * @Author ysy
     * @Description 拉取到消息时执行
     * @Date 17:47 [records]
     * @Param
     * @return org.apache.kafka.clients.consumer.ConsumerRecords
     **/
    @Override
    public ConsumerRecords onConsume(ConsumerRecords records) {
        return null;
    }

    @Override
    public void close() {

    }

    /**
     * @Author ysy
     * @Description 提交请求响应成功时执行
     * @Date 17:47 [offsets]
     * @Param 
     * @return void
     **/
    @Override
    public void onCommit(Map offsets) {

    }

    @Override
    public void configure(Map<String, ?> configs) {

    }
}
